<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

    <script type="text/javascript">
        //编写一个JavaScript对象  ES6
        var user={
            name:"秦疆",
            age:3,
            sex:"男"
        }
        //将js对象转换为json对象；
        var obj = JSON.stringify(user)
        console.log(obj)

        console.log(user)
        //将json对象转化为JavaScript对象
        var user2 = JSON.parse(obj)
        console.log(user2)

    </script>

</head>
<body>

</body>
</html>
